luci-mod-network: parse ports without tag/pvid annotation as well
authorJo-Philipp Wich <[email protected]>
Thu, 17 Jun 2021 15:44:21 +0000 (17:44 +0200)
committerJo-Philipp Wich <[email protected]>
Thu, 1 Jul 2021 19:15:04 +0000 (21:15 +0200)
Fixes: 01eac366f6 ("luci-mod-network: fix tagging/pvid state parsing in bridge-vlan ports")
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit e57f8663afd53cc7421debcd63444e1d136f5dec)

modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index bba0e80f870350a8dc9fc440bc9f3d7bde1cc16f..e066cb43dde933bb7a0a778970a409c366c18046 100644 (file)
@@ -272,9 +272,9 @@ var cbiTagValue = form.Value.extend({
                        if (s[0] != this.port)
                                continue;
 
-                       var t = s[1].match(/t/) ? 't' : 'u';
+                       var t = /t/.test(s[1] || '') ? 't' : 'u';
 
-                       return s[1].match(/\*/) ? [t, '*'] : [t];
+                       return /\*/.test(s[1] || '') ? [t, '*'] : [t];
                }
 
                return ['-'];